What are the alternatives for drawing a simple curve for a function like
eq = function(x){x*x}
in R?
plot
has a plot.function
method
plot(eq, 1, 1000)
Or
curve(eq, 1, 1000)
The easiest way is using curve without predefined function
You can also use curve when you have a predfined function
If you want to use ggplot, you have a choise between qplot
and ggplot
|